#pragma once

#include "clientApdu.hpp"

class ActionRequestApdu : public ClientApdu {
public:
    ActionRequestApdu(const ByteStream &oad, const ByteStream &data) {
        if (oad.size() != OadSize) {
            std::cerr << "bad oad, please check!!!" << std::endl;
            return;
        }

        _stream << static_cast<uint8_t>(ClientApduType::ACTION_REQUEST)  // 操作请求
                << 0x01                                                  // 读一个对象
                << 0x01                                                  // piid, 优先级
                << oad                                                   // 数据标识
                << data                                                  // 数据Data
                << 0x00;                                                 // 无时间标签
    }
};
